package com.xianguo.app1;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;

public class WebViewer extends Activity implements OnClickListener {
    private WebView viewer;

	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.web_viewer);
        viewer = (WebView)findViewById(R.id.webViewerContainer);
        //viewer.loadUrl("http://www.baidu.com");
        Button goTo = (Button)findViewById(R.id.webViewerBtn);
        goTo.setOnClickListener(this);
        
//        Button btnToDateAct = (Button)findViewById(R.id.btnToDateAct);
//        btnTo
    }

	@Override
	public void onClick(View v) {
		switch(v.getId()){
		case R.id.webViewerBtn:
			EditText text = (EditText)findViewById(R.id.webViewerUrlInput);
			String url = text.getText().toString();
			
			
			viewer.loadUrl(url);
			break;
		}
		
	}
	
}
